put the value of (card field f1) + (card field f2) + (card field f3) + (card field f4) + (card field f5) + (card field f6) + (card field f7) into sum
put the value of (card field f1 * 0) into card field f8
put the value of (card field f2 * 1) into card field f9
put the value of (card field f3 * 2) into card field f10
put the value of (card field f4 * 3) into card field f11
put the value of (card field f5 * 4) into card field f12
put the value of (card field f6 * 5) into card field f13
put the value of (card field f7 * 6) into card field f14
put (card field f8) + (card field f9) + (card field f10) + (card field f11) + ( card field f12) + (card field f13) + (card field f14) into total
put the value of (total/sum) into pois
set numberFormat to "00.00"
put the value of ((2.718 ^- pois) * 1 * sum) into card field f15
put the value of ((2.718 ^- pois) * pois * sum) into card field f16
put the value of ((2.718 ^- pois) * ((pois ^2) / 2) * sum) into card field f17
put the value of ((2.718 ^- pois) * ((pois ^3) / 6) * sum) into card field 18
put the value of ((2.718 ^- pois) * ((pois ^4) / 24) * sum) into card field f19
put the value of ((2.718 ^- pois) * ((pois ^5) / 120) * sum) into card field 20
put the value of ((2.718 ^- pois) * ((pois ^6) / 720) * sum) into card field 21
end mouseUp
-- part 23 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=356 top=253 right=275 bottom=456
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CLEAR
----- HyperTalk script -----
on mouseUp
delete line 1 of card field f1
put 0 into card field f2
put 0 into card field f3
put 0 into card field f4
put 0 into card field f5
put 0 into card field f6
put 0 into card field f7
put 0 into card field f8
put 0 into card field f9
put 0 into card field f10
put 0 into card field f11
put 0 into card field f12
put 0 into card field f13
put 0 into card field f14
put 0 into card field f15
put 0 into card field f16
put 0 into card field f17
put 0 into card field f18
put 0 into card field f19
put 0 into card field f20
put 0 into card field f21
get the location of card field f1
click at it
end mouseUp
-- part 24 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=358 top=310 right=332 bottom=458
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CHI SQUARE
----- HyperTalk script -----
on mouseUp
global bagone
global bagtwo
global bagthree
global bagfour
global sackone
global sacktwo
global sackthree
global sackfour
put the value of card field f1 into bagone
put the value of card field f2 into bagtwo
put the value of card field f3 into bagthree
put the value of card field f4 into bagfour
put the value of card field f15 into sackone
put the value of card field f16 into sacktwo
put the value of card field f17 into sackthree
put the value of card field f18 into sackfour
go to card id 25732
put bagone into card field "CLASS1"
put bagtwo into card field "CLASS2"
put bagthree into card field "CLASS3"
put bagfour into card field "CLASS4"
put sackone into card field "f5"
put sacktwo into card field "f6"
put sackthree into card field "f7"
put sackfour into card field "f8"
end mouseUp
-- part 25 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=205 top=315 right=337 bottom=256
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: NEXT
----- HyperTalk script -----
on mouseUp
go to next card
end mouseUp
-- part 26 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=149 top=314 right=337 bottom=199
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: PREV.
----- HyperTalk script -----
on mouseUp
go back
end mouseUp
-- part contents for background part 1
----- text -----
POISSON DISTRIBUTION
-- part contents for background part 2
----- text -----
The program at the right will allow you to perform a Poisson analysis of skewed data. Simply enter the observed values for each desired event in your analysis under the column Recorded Values. Click on the CALCULATE button and the program will provide you with the Expected Values based on a Poisson Probability which is built into the program. You can compare the fit of the expected values with the recorded values via the Chi Square program elsewhere in this stack. However, if you do, you must select a degree of freedom that is two less than the number of data categories you are using in your analysis. Note also that because of the limited data slots in the Chi Square program in this stack, only the first four data classes in the Poisson distribution will be automatically carried into the Chi Square program. Use two degrees of freedom in your analysis of such data.